package com.xxxx.comment.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xxxx.comment.entity.Blog;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author 虎哥
 * @since 2021-12-22
 */
@Mapper
public interface BlogMapper extends BaseMapper<Blog> {

    List<Blog> getBlogs(@Param("userId") Long userId);

    List<Blog> queryHotBlogs();

    boolean likedBlog(@Param("blogId") Long blogId, @Param("isLiked") Boolean isLiked);

    Blog queryBlogById(@Param("id") Long id);

    List<Blog> queryMyBlogs(@Param("userId") Long userId);

}
